home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacGames Sampler
/
PHT MacGames Bundle.iso
/
MacSource Folder
/
Samples from the CD
/
C and C++
/
flight simulator ƒ
/
perspect.h
< prev
next >
Wrap
Text File
|
1988-12-22
|
1KB
|
77 lines
/* menus */
#define MENU_APPLE 1
#define MENU_FILE 2
#define MENU_EDIT 3
/* windows */
#define MENU_BAR_HEIGHT 20
#define SCREEN_WIDTH 512
#define SCREEN_HEIGHT 342
#define SCREEN_MARGIN 4
#define TITLE_BAR_HEIGHT 18
#define inZoomIn 7
#define inZoomOut 8
#define WIND_MAIN 128
#define pass(x) (x)
#define MOUSE_POS (*(Point *)(0x830))
#define GRID_SZ 10
struct Vector {
double x;
double y;
double z;
};
typedef struct Vector Vector;
struct FxVector {
Fixed x;
Fixed y;
Fixed z;
};
typedef struct FxVector FxVector;
typedef double ThreeMatrx[3][3];
typedef Fixed FxThreeMatrx[3][3];
typedef Fract FracThreeMatrx[3][3];
struct FracThreeMatrxStrc {
Fract entrys[3][3];
};
typedef struct FracThreeMatrxStrc FracThreeMatrxStrc;
struct FxGridMatrx {
FxVector entrys[GRID_SZ][GRID_SZ];
};
typedef struct FxGridMatrx FxGridMatrx;
#define FIX_HALF (0x8000)
#define FIX_ONE (0x10000)
#define FRAC_ONE (0x40000000)
#define FIX_NG_ONE (0xffff0000)
#define FixToD(x) ldexp((double)(x),-16)
#define DToFix(x) ((long)ldexp((x),16))
#define FixToi(x) ((int)((x)>>16))
#define RndFixToi(x) ((int)((x)+FIX_HALF>>16))
#define iToFix(x) (((long)(x)<<16))
#define FixRound(x) FixToi(x)
#define Frac2Fix(x) ((x)>>14)
#define Fix2Frac(x) ((x)<<14)
#define FracToD(x) ldexp((double)(x),-30)
#define DToFrac(x) ((long)ldexp((x),30))
#define Fx_DEGtoRAD ((long)0x477)
Fixed _FixMul(), _FixDiv();
#define stepSize 2
#define startHeight 4